From e6baf56c8c02cd129dd1d043aab9183efaed2ef1 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 15 Apr 2010 09:04:45 +0100 Subject: [PATCH] Make cpu param to continue_hypercall_on_cpu() an unsigned integer. Negative input makes no sense, and this makes the input range check correct. Signed-off-by: Keir Fraser --- xen/common/domain.c | 3 ++- xen/include/xen/domain.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 6688b158d9..6707b33246 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -943,7 +943,8 @@ static void continue_hypercall_tasklet_handler(unsigned long _info) } } -int continue_hypercall_on_cpu(int cpu, long (*func)(void *data), void *data) +int continue_hypercall_on_cpu( + unsigned int cpu, long (*func)(void *data), void *data) { struct migrate_info *info; diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h index 3699291aca..79711bdb29 100644 --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -64,7 +64,8 @@ bool_t domctl_lock_acquire(void); void domctl_lock_release(void); /* Continue the current hypercall via func(data) on specified cpu. */ -int continue_hypercall_on_cpu(int cpu, long (*func)(void *data), void *data); +int continue_hypercall_on_cpu( + unsigned int cpu, long (*func)(void *data), void *data); extern unsigned int xen_processor_pmbits; -- 2.30.2